<html lang="en">
  <head>
    <meta name="google-signin-scope" content="profile email">
    <meta name="google-signin-client_id" content="405744597634-l26ciumdgpc517rhpbq0e13loupl2rs9.apps.googleusercontent.com">
    <script src="https://apis.google.com/js/platform.js" async defer></script>
  </head>
  <body>
    <div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>
    <script>
      function onSignIn(googleUser) {
        alert("connected");
        
        //lấy thông tin user
        var profile = googleUser.getBasicProfile();
        console.log(profile);

        // console.log("ID: " + profile.getId()); // Don't send this directly to your server!
        // console.log("Name: " + profile.getName());
        // console.log("Image URL: " + profile.getImageUrl());
        // console.log("Email: " + profile.getEmail());

        // The ID token you need to pass to your backend:
        // var id_token = googleUser.getAuthResponse().id_token;
        // console.log("ID Token: " + id_token);

        //thực hiện kết nối wifi
        //connect();
      };
    </script>
  </body>
</html>